package com.hgd.action;

import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class LogoutAction extends ActionSupport {

	@Override
	public String execute() throws Exception {
		Map<String, Object> session = ActionContext.getContext().getSession();
		String logoutResult;
		if (session.get("commonUser")!=null) {
			session.remove("commonUser");
			logoutResult = "common";
		}else{
			session.remove("superUser");
			logoutResult = "super";
		}
		
		return logoutResult;
	}
	
}
